package com.syuswe.qimo_02.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.syuswe.qimo_02.pojo.Emp;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author n7c.swe
 * {@code @date} 2024-05
 */
@Mapper
public interface EmpMapper extends BaseMapper<Emp> {

    // 查询总记录数
    @Select("select count(*) from emp")
    public Long count();

    // 分页查询 获取列表数据
    @Select("select * from emp limit #{start} , #{pageSize}")
    public List<Emp> page(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

}
